package com.epfly.base.vo;


import lombok.Data;
import lombok.experimental.SuperBuilder;

@SuperBuilder(builderMethodName = "baseRespBuilder")
@Data
public class BaseResp {

    public static final BaseResp OK = new BaseResp();

    public boolean success() {
        return this.errCode == 0;
    }

    public BaseResp() {

    }

    public BaseResp(int errCode, String errMsg) {
        this(errCode, errMsg, null);
    }

    public BaseResp(int errCode, String errMsg, String errorDetail) {
        this.errCode = errCode;
        this.errMsg = errMsg;
        this.errorDetail = errorDetail;
    }

    private int errCode = 0;

    private String errMsg = "success";

    private String errorDetail;
}
